<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/1
 * Time: 16:07
 */
namespace vendor\user;
class user
{
    private static $userCount;
    //构造函数
    public function __construct()
    {
        self::$userCount++;
        echo '创建对象<br/>';
    }
    //注册
    public function register(){
        echo '注册<br/>';
    }
    //登录
    public function login(){
        echo '登录<br/>';
    }
    //修改密码
    public function updatepwd()
    {
        echo '修改密码<br/>';
    }
    //析构函数
    public function __destruct()
    {
        echo '删除对象<br/>';
        self::$userCount--;
    }
    //获取在线人数
    public static function getOnlineNum(){
        return self::$userCount;
    }
    public function mylevel(){
        echo '普通用户<br/>';
    }
}